import type { PlusColumn } from 'plus-pro-components'

export function useForm() {
    const schema: PlusColumn[] = [
        {
            colProps: {
                span: 6,
            },
            label: '户型名称',
            prop: 'huxmc',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '所属项目',
            prop: 'xiangmmc',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '行政区划',
            prop: 'xingzqh',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '所属企业',
            prop: 'suosqy',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '创建人',
            prop: 'CreatedName',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '上架审批状态',
            options: async () => [
                {
                    label: '审批中',
                    value: '审批中',
                },
                {
                    label: '通过',
                    value: '通过',
                },
                {
                    label: '驳回',
                    value: '驳回',
                },
            ],
            prop: 'shangjspzt',
            valueType: 'select',
        },
    ] as const

    const form = ref({
        CreatedName: '',
        huxmc: '',
        shangjspzt: '',
        suosqy: '',
        xiangmmc: '',
        xingzqh: '',
    })
    return { form, schema }
}
